﻿Imports System.Web
Imports System.Data.SqlClient
Imports System.Data
Imports parameter

Partial Class _113_UC03_010
    Inherits System.Web.UI.Page
    Private strName As String = ""
    Private strPass As String = ""
    Property proName() As String
        Get
            Return strName
        End Get
        Set(ByVal value As String)
            strName = value
        End Set
    End Property

    Property proPass() As String
        Get
            Return strPass
        End Get
        Set(ByVal value As String)
            strPass = value
        End Set
    End Property

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim strErrors As String = ""
        Dim strSuccess As String = ""
        Dim flag As Boolean = 0
        'Dim filename As String = "D:/Program/EC/eCSS - Version 01-080420/eCSS - Version 01/App_Data/practise01.mdb"
        'Using Sql server 2000 or 2005
        Dim strConnect As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=D:\Ngoc Thanh\University Project\ASP - EC new\EC - 20080520\App_Data\HAIDANG_DATABASE.mdf;Integrated Security=True;User Instance=True"
        'Using access
        'Dim strCon As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
        Dim cn As New SqlConnection(strConnect)
        cn.Open()
        Dim cmd As New SqlCommand("select A.*,B.*,C.*,D.* from  M_TAIKHOAN A, M.CANHAN B, M_THETINDUNG C, M_KHUYENMAI D where TenDangNhap= '" + strName.ToString + "'", cn)
        Dim adapter As New SqlDataAdapter(cmd)
        Dim table As DataTable = New DataTable("TenDangNhap")
        'adapter.Fill(table)
        'cn.Close()
        'If table.Rows.Count > 0 Then
        '    strSuccess += "Thank you for login." + vbNewLine
        '    MsgBox(strSuccess, MsgBoxStyle.Information, "Information")
        'End If
    End Sub
End Class
